<table width="100%" cellspacing="0">
<tbody>
<tr>
<?php if($this->auth) {?>
<td valign="top" bgcolor="#f0f0f0" style="width:170px"><table width = "100%" cellpadding="0" cellspacing="0" bgcolor="#f0f0f0">
  <tr>
    <td><table border="0" cellpadding="3" cellspacing="0" width="100%" style="border-bottom:1px solid blue">
      <tbody>
        <tr>
          <td bgcolor="#dddddd"><span style="float: left;"><b>Project </b></span></td>
        </tr>
      </tbody>
    </table></td>
  </tr>
  <tr>
    <td><table border="0" cellpadding="3" cellspacing="0" width="100%">
      <tbody>
        <tr>
          <td valign="top"><a href="<?=$this->baseUrl()?>/project">Projects</a></td>
        </tr>
      </tbody>
    </table></td>
  </tr>
</table>
<?php if ($this->acl->isAllowed($this->userGroup, null, "admin")) {?>
  <table width = "100%" cellpadding="0" cellspacing="0" bgcolor="#f0f0f0">
    <tr>
      <td><table border="0" cellpadding="3" cellspacing="0" width="100%" style="border-bottom:1px solid blue">
          <tbody>
            <tr>
              <td bgcolor="#dddddd"><span style="float: left;"><b>User, Groups &amp; Roles </b></span></td>
            </tr>
          </tbody>
      </table></td>
    </tr>
    <tr>
      <td><table border="0" cellpadding="3" cellspacing="0" width="100%">
          <tbody>
            <tr>
              <td valign="top"><a href="<?=$this->baseUrl()?>/user/browse">User Browser </a></td>
            </tr>
            <tr>
              <td valign="top"><a href="<?=$this->baseUrl()?>/groups/browse">Group Browser</a></td>
            </tr>
            <tr>
              <td valign="top"><a href="<?=$this->baseUrl()?>/roles/browse">Project Role Browser </a></td>
            </tr>
          </tbody>
      </table></td>
    </tr>
  </table>
  <?php }?>
  <?php if ($this->acl->isAllowed($this->userGroup, null, "admin")) {?>
  <table width = "100%" cellpadding="0" cellspacing="0" bgcolor="#f0f0f0">
    <tr>
      <td><table border="0" cellpadding="3" cellspacing="0" width="100%" style="border-bottom:1px solid blue">
          <tbody>
            <tr>
              <td bgcolor="#dddddd"><span style="float: left;"><b>Issue Settings </b></span></td>
            </tr>
          </tbody>
      </table></td>
    </tr>
    <tr>
      <td><table border="0" cellpadding="3" cellspacing="0" width="100%">
          <tbody>
            <tr>
              <td valign="top"><a href="<?=$this->baseUrl()?>/type/manage">Issue types</a></td>
            </tr>
            <tr>
              <td valign="top"><a href="<?=$this->baseUrl()?>/priority/manage">Priorities</a></td>
            </tr>
            <tr>
              <td valign="top"><a href="<?=$this->baseUrl()?>/resolution/manage">Resolutions</a></td>
            </tr>
            <tr>
              <td><a href="<?=$this->baseUrl()?>/status/manage">Statuses</a></td>
            </tr>
          </tbody>
      </table></td>
    </tr>
  </table>
  <?php }?>
 </td>
<?php }?>
<td valign="top">
<br>
<table width = "98%" align="center" border="0" cellpadding="0" cellspacing="0">
	<tbody>
		<tr>
			<td>
				<?php if($this->auth && $this->acl->isAllowed($this->userGroup, null, "admin")) { ?>
				<table width = "100%" align = "center" bgcolor="#bbbbbb" cellspacing="0" style="border:1px solid #bbbbbb">
					<tr bgcolor="#f0f0f0">
					  <td style="border-bottom:0px">
								<h3 style="margin:3px 0 0 5px;height:20px">Administration</h3>
								<br />
						</td>
					</tr>
					<tr>
						<td bgcolor="#ffffff">Bellow is the list of all projects in this installation.
						<br />
						<b><a href="<?=$this->baseUrl()?>/project/add">Add Project</a></b>
						</td>
					</tr>
				</table>
				<br />
				<?php } ?>
				<table width = "100%" bgcolor="#bbbbbb" border="0" cellpadding="0" cellspacing="0" align="center">
                  <tbody>
                    <tr>
                      <td><table id="issuetable" border="0" cellpadding="3" cellspacing="1" width="100%">
                          <tbody>
                            <tr bgcolor="#f0f0f0">
                              <td class="colHeaderLink" width="1%" nowrap><b>Project Name</b></td>
                              <td class="colHeaderLink" width="1%" nowrap><b>Description</b></td>
                              <td class="colHeaderLink" width="1%" nowrap><b>Project Lead</b></td>
                              <td class="colHeaderLink" width="1%" nowrap><b>Home Page</b></td>
							  <?php if ($this->auth && $this->acl->isAllowed($this->userGroup, null, "admin")) {?>
							  <td class="colHeaderLink" width="1%" nowrap><b>Operations</b></td>
                            <?php } ?>
							</tr>
                            <?php 
						$i = 1;
						foreach ($this->data as $d) { ?>
                            <tr <?php if($i % 2) { echo "class='rowNormal'"; } else { echo "class='rowAlternate'";}?>>
                              <td><a href = "<?=$this->url(array('controller'=>'project','action'=>'browse','project'=> $d["id"]))?>">
                                <?=$d['pname']?>
                              </a></td>
                              <td class="nav description"><?=$d['description']?></td>
                              <td><?=$d['lead']?></td>
                              <td><a href="<?=$d[url]?>">
                                	<?=$d['url']?>
                              	</a>
							  </td>
							  <?php if ($this->auth && $this->acl->isAllowed($this->userGroup, null, "admin")) { ?>
							  <td class="nav operations">
									<a href="">View</a>
									<a href="<?=$this->baseUrl()?>/project/edit/projectId/<?=$d['id']?>">Edit</a>
									<a href="">Delete</a>
							  </td>
							  <?php } ?>
                            </tr>
                            <?php 
							$i++;
						}?>
                          </tbody>
                      </table></td>
                  </tbody>
                </table></td>
	</tbody>
</table>
</td>
</tr>
</tbody>
</table>